package com.decapre.zufangwang.service;

import com.decapre.zufangwang.entity.Region;
import com.decapre.zufangwang.repository.RegionRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RegionServiceImpl implements RegionService{

    private RegionRepository regionRepository;

    @Autowired
    public RegionServiceImpl(RegionRepository rr){
        this.regionRepository = rr;
    }

    @Override
    public List<Region> getAllRegionsWithDistricts() {
        return regionRepository.getAllRegionsWithDistricts();
    }
}
